/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wuqingyu
 * Date: 2024-03-29
 * Time: 15:53
 */
public class Test {
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(12);
        myLinkedList.addLast(12);
        myLinkedList.addLast(12);
        myLinkedList.addLast(12);
        myLinkedList.addLast(12);
        myLinkedList.display();
        myLinkedList.remove(12);
        myLinkedList.display();
        myLinkedList.removeAll(12);
        myLinkedList.display();
    }

    public static void main2(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.addLast(12);
        mySingleList.addLast(12);
        mySingleList.addLast(12);
        mySingleList.addLast(12);
        mySingleList.addLast(12);
        mySingleList.display();
        mySingleList.remove(12);
        mySingleList.display();
        mySingleList.removeAll(12);
        mySingleList.display();

    }
    public static void main3(String[] args) {
        MySingleList mySingleList = new MySingleList();
       /* mySingleList.addLast(12);
        mySingleList.addLast(23);
        mySingleList.addLast(34);
        mySingleList.addLast(45);
        mySingleList.addLast(56);*/
        mySingleList.display1(mySingleList.head);
        System.out.println();
        mySingleList.display2();
    }

    public static void main4(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.removeAll(12);
    }

    public static void main5(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.addFirst(34);
        mySingleList.addFirst(23);
        mySingleList.addFirst(12);
        mySingleList.display();
        mySingleList.addLast(45);
        mySingleList.addLast(56);
        mySingleList.display();
        mySingleList.removeFirst();
        mySingleList.display();
        mySingleList.removeLast();
        mySingleList.display();
    }
    public static void main6(String[] args) {
        MySingleListHaveTail mySingleListHaveTail = new MySingleListHaveTail();
        mySingleListHaveTail.addFirst(34);
        mySingleListHaveTail.addFirst(23);
        mySingleListHaveTail.addFirst(12);
        mySingleListHaveTail.display();
        mySingleListHaveTail.addLast(45);
        mySingleListHaveTail.addLast(56);
        mySingleListHaveTail.display();
        mySingleListHaveTail.removeFirst();
        mySingleListHaveTail.display();
        mySingleListHaveTail.removeLast();
        mySingleListHaveTail.display();
    }
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(34);
        myLinkedList.addFirst(23);
        myLinkedList.addFirst(12);
        myLinkedList.display();
        myLinkedList.addLast(45);
        myLinkedList.addLast(56);
        myLinkedList.display();
        myLinkedList.removeFirst();
        myLinkedList.display();
        myLinkedList.removeLast();
        myLinkedList.display();
    }
}
